package com.ambimmort.shj.action.common;

import com.ambimmort.shj.service.GenaralFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by hedingwei on 7/9/15.
 */
@Controller("/action/common/add_black_domain.do")
public class Add_BalckDomain {


    @Autowired
    private GenaralFileService generalFileService;

    /**
     *
     * @param request
     * @param content  {
     *                 "a":"b"
     * }
     * @return
     */
    @RequestMapping("/action/common/add_black_domain.do")
    @ResponseBody
    public boolean action_crm(
            HttpServletRequest request, @RequestParam("content") String content) {
        try {
            generalFileService.addBlackDomain(content);
            return true;
        } catch (Throwable throwable) {
            throwable.printStackTrace();
            return false;
        }
    }
}
